<template>
  <div style="height: 50px; line-height: 50px; border-bottom: 1px solid #ccc;">
    <el-row>
      <el-col :span="4">
        <div style="padding-left: 60px;font-weight: bold; color: dodgerblue" class="grid-content bg-purple">
          后台管理
        </div>
      </el-col>
      <el-col :span="18">
        <div style="text-align: center; color: dodgerblue" class="grid-content bg-purple-light">
          duiduo
        </div>
      </el-col>
      <el-col :span="2">
        <div class="grid-content bg-purple">
          <el-dropdown>
        <span class="el-dropdown-link">
          <el-avatar
              :size="30"
              :src="user.avatar"
              style="position: relative; top: 10px"
          ></el-avatar>
          {{ user.nickname }}
          <i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>
        </span>
            <template #dropdown>
              <el-dropdown-menu>
                <el-dropdown-item @click="$router.push('/person')">个人信息</el-dropdown-item>
                <el-dropdown-item @click="$router.push('/login')">退出系统</el-dropdown-item>
              </el-dropdown-menu>
            </template>
          </el-dropdown>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>

export default {
  name: "Header",
  props: ['user'],
  data() {
    return {}
  },
  created() {
  },
  methods: {}
}
</script>

<style scoped>

</style>